//
//  BaseViewController.h
//  dyss_v2
//
//  Created by LXF on 16/1/26.
//  Copyright © 2016年 First Facility. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CustomLogTools.h>
#import "Skin.h"
#import <UIKit_Category.h>
#import <Foundation_category.h>
#import <Masonry.h>
#import "DYProgressHUD.h"
#import "DYMacroTools.h"
#import "DYNotificationKeySet.h"
#import "TYAlertController_PACK.h"


@interface BaseViewController : UIViewController

#pragma mark - initial 1.0
/// 准备初始化工作
-(void)prepareInitial;


/// 将要初始化数据
-(void)willInitial;
/// 初始化数据
-(void)initData;
/// 初始化 ui
-(void)initUI;
/// 布局
-(void)layoutContentView;
/// 绑定事件
-(void)bindEvent;
/// 初始化完毕
-(void)didInitial;


#pragma mark - initial 2.0
/// 准备初始化工作
//-(void)prepareInitial;

/// 将要初始化
//-(void)willInitial;
/// 初始化数据
//-(void)initData;

/// 初始化 ui
-(void)initUI:(UIView *)referView;
/// 布局
-(void)layoutContentView:(UIView *)referView;

/// 绑定事件
//-(void)bindEvent;
/// 初始化完毕
//-(void)didInitial;

@property (nonatomic, strong) UIView *referView;

#pragma mark - prepareBackgroundImageView
/// 需要背景图
///
/// @return 返回 YES 则需要
- (BOOL)needBackgroundImageView;
/// 准备背景的主方法
- (void)prepareBackground;

@property (nonatomic, strong) UIImageView *backgroundImageView;
@property (nonatomic, strong) UIImage *backgroundImage;

/// 默认重写此方法则返回控制器 self.view 背景颜色
@property (nonatomic, readonly) UIColor *backgroundColor;

#pragma mark - 是否需要键盘弹出监听(重写)
//- (BOOL)needKeyboardManager;

#pragma mark - 是否需要交互式弹出手势(重写)
/// 默认需要
- (BOOL)needInteractivePopGesture;
@property (nonatomic, weak) UINavigationController *weakNavigationController;

#pragma mark - 是否需要导航栏右边的摁钮
/// 如果 返回 nil 没有右边摁钮
- (UIImage *)needEnabledNavigationRightBarButton;

/// 右边摁钮 点击事件调用方法 请在子类重写用于调用
-(void)rightBarButton_onClick;

@end
